CONFIG -= qt

TARGET = simpleble
TEMPLATE = lib
DEFINES += SIMPLEBLE_LIBRARY WIN64

CONFIG += \
    c++17 \
    dll

DESTDIR = ./bin

CONFIG(debug, debug|release) {
MOC_DIR = ./debug/moc
OBJECTS_DIR = ./debug/obj
RCC_DIR += ./debug/rcc

} else {
MOC_DIR = ./release/moc
OBJECTS_DIR = ./release/obj
RCC_DIR += ./release/rcc

contains(TEMPLATE, "lib"){
DLLDESTDIR = ./bin_release
DESTDIR = ./lib
} else{
DESTDIR =  ./bin_release
}
}

msvc {
    QMAKE_CFLAGS += /utf-8
    QMAKE_CXXFLAGS += /utf-8
}

INCLUDEPATH += \
    include/ \
    include/simpleble \
    include/external \
    src/ \
    src/backends/ \
    src/backends/common/ \
    src/backends/windows/ \
    src/builders/ \
    src/external/ \
    $$PWD/thirdparty/fmt/include/

SOURCES += \
    src/backends/common/CharacteristicBase.cpp \
    src/backends/common/DescriptorBase.cpp \
    src/backends/common/ServiceBase.cpp \
    src/backends/windows/AdapterBase.cpp \
    src/backends/windows/PeripheralBase.cpp \
    src/backends/windows/Utils.cpp \
    src/builders/AdapterBuilder.cpp \
    src/builders/CharacteristicBuilder.cpp \
    src/builders/DescriptorBuilder.cpp \
    src/builders/PeripheralBuilder.cpp \
    src/builders/ServiceBuilder.cpp \
    src/frontends/base/Adapter.cpp \
    src/frontends/base/Characteristic.cpp \
    src/frontends/base/Descriptor.cpp \
    src/frontends/base/Peripheral.cpp \
    src/frontends/base/Service.cpp \
    src/frontends/safe/AdapterSafe.cpp \
    src/frontends/safe/PeripheralSafe.cpp \
    src/Exceptions.cpp \
    src/Logging.cpp \
    src/Utils.cpp

HEADERS += \
    include/simpleble/Adapter.h \
    include/simpleble/AdapterSafe.h \
    include/simpleble/Characteristic.h \
    include/simpleble/Descriptor.h \
    include/simpleble/Exceptions.h \
    include/simpleble/Logging.h \
    include/simpleble/Peripheral.h \
    include/simpleble/PeripheralSafe.h \
    include/simpleble/Service.h \
    include/simpleble/SimpleBLE.h \
    include/simpleble/Types.h \
    include/simpleble/Utils.h \
    include/simpleble/export.h \
    include/external/kvn_bytearray.h \
    src/backends/common/AdapterBaseTypes.h \
    src/backends/common/CharacteristicBase.h \
    src/backends/common/DescriptorBase.h \
    src/backends/common/ServiceBase.h \
    src/backends/windows/AdapterBase.h \
    src/backends/windows/PeripheralBase.h \
    src/backends/windows/Utils.h \
    src/builders/AdapterBuilder.h \
    src/builders/CharacteristicBuilder.h \
    src/builders/DescriptorBuilder.h \
    src/builders/PeripheralBuilder.h \
    src/builders/ServiceBuilder.h \
    src/external/kvn_safe_callback.hpp \
    src/external/logfwd.hpp \
    src/external/TaskRunner.hpp \
    src/external/ThreadRunner.h \
    src/CommonUtils.h \
    src/LoggingInternal.h

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/thirdparty/fmt/lib/ -lfmt
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/thirdparty/fmt/lib/ -lfmtd

DEPENDPATH += $$PWD/thirdparty/fmt/include
